package toolCategories

import androidx.compose.material.Icon
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.painterResource
import kotlinx.coroutines.runBlocking
import org.jetbrains.compose.resources.getString
import org.jetbrains.compose.resources.painterResource
import tool.Tool
import tool.math.NumberBaseConverterTool
import top.mcwebsite.devtoolbox.devtoolbox.generated.resources.Res
import top.mcwebsite.devtoolbox.devtoolbox.generated.resources.math

object MathToolCategory : ToolCategory {

    private val _name: String by lazy {
        runBlocking {
            getString(Res.string.math)
        }
    }

    override fun getName(): String {
        return _name
    }

    override fun getTools(): List<Tool> {
        return listOf(NumberBaseConverterTool)
    }


    @Composable
    override fun ToolCategoryIcon(modifier: Modifier) {
        Icon(painterResource(Res.drawable.math), contentDescription = "Math Tools", modifier)
    }
}